Creating a UFL function requires that you create only one more C code module and a module definition (.def) file in addition to the Helper modules. (Your particular UFL Function needs may require more modules, but the simplest method for creating a UFL requires creating only these two.) For information on creating the module definition file, seeModule Definition (.def) File. To begin building your UFL, create a new C module in your IDE, and save it to your working directory with the same name as your project file. For example, if your project file is named UFLSAMP.MAK or UFLFUNCS.PRJ, you would name your C module UFLSAMP.C or UFLFUNCS.C respectively. This demonstration will refer to UFLSAMP.C. This is the "private" C module for your UFL because it is the one section of code that must be unique to your UFL.
The first step to programming your UFL's private C code module is to #include the appropriate header files:
You do not need to #include the UFFUNCS.H header file that you also copied into your working directory. This file is already #included by UFMAIN.C, and you will not be directly calling any of the functions defined in these files (though they are necessary for Crystal Reports when the Formula Editor accesses your UFL).
The private C code module of your UFL requires several parts:
Most of these sections have specific guidelines that must be used and that are the same for every function you add to your UFL. Your UFL function implementation is completely designed and programmed by you. It is the functionality that you are adding to the Crystal Reports Formula Editor.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |